﻿
namespace TotalSystems.Web.Services.Store
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data;
    using System.Linq;
    using System.ServiceModel.DomainServices.EntityFramework;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;
    using TotalSystems.Business;
    using TotalSystems.DataAccess;
    using TotalSystems.Business.Store;
    using TotalSystems.Business.Entitys.Store;


    //Implements application logic using the TSContext context.
    //TODO: Add your application logic to these methods or in additional methods.
    //TODO: Wire up authentication (Windows/ASP.NET Forms) and uncomment the following to disable anonymous access
    //Also consider adding roles to restrict access as appropriate.
    //[RequiresAuthentication]
    [EnableClientAccess()]
    public class DegreeImportantStuffService : LinqToEntitiesDomainService<TSContext>
    {
        DegreeImportantStuffRepository _context = new DegreeImportantStuffRepository();
   
        #region Select
        
        public IEnumerable<STR_DegreeImportantStuff> GetDegreeImportantStuff()
        {

            return _context.GetDegreeImportantStuff().ToArray();
        }

        #endregion

        #region Insert

        [Insert]
        public void InsertDIS(STR_DegreeImportantStuff sTR_DegreeImportantStuff)
        {
           // _context.InsertDegreeImportantStuff(sTR_DegreeImportantStuff);
        }

        [Invoke]
        public void InsertDegreeImportantStuff(STR_DegreeImportantStuff sTR_DegreeImportantStuff)
        {
            _context.InsertDegreeImportantStuff(sTR_DegreeImportantStuff);
        }
        #endregion

        #region Update

        [Update]
        public void UpdateDIS(STR_DegreeImportantStuff sTR_DegreeImportantStuff)
        {
            //_context.UpdateDegreeImportantStuff(sTR_DegreeImportantStuff);
        }

        [Invoke]
        public void UpdateDegreeImportantStuff(STR_DegreeImportantStuff sTR_DegreeImportantStuff)
        {
            _context.UpdateDegreeImportantStuff(sTR_DegreeImportantStuff);
        }

        #endregion


        #region Delete

        [Delete]
        public void DeleteDIS(STR_DegreeImportantStuff sTR_DegreeImportantStuff)
        {

        }

        #endregion


        //[Invoke]
        public DegreeImportantStuffWrapper Test()
        {
            return null;
        }
    }
}


